#We define the flags that will be passed as arguments to the compiler through
#the ADD_DEFINITIONS directive. It is optional to do it but the default flags
#passed to the compiler are not sufficiently severe to check and report the
#warnings and bugs.
SET ( MySQLincludePath /usr/include/mysql )
SET ( MySQLPPIncludePath /usr/local/include/mysql++/ )

ADD_DEFINITIONS(-g -Wall -I${MySQLPPIncludePath} -I${MySQLincludePath})

SET ( SRC_LIST  DbServer.cpp DbService.cpp inOutMsgCenter.cpp  main.cpp )

SET (LOCAL_LIB_PATH ../../../lib/)
MESSAGE (STATUS "cmake Begin to work")

ADD_EXECUTABLE(dbMySQL ${SRC_LIST})

#Designate the library linked to.
TARGET_LINK_LIBRARIES(dbMySQL -L/usr/lib/mysql/ -L/usr/local/lib -lmysqlclient
                      -lmysqlpp -lboost_system protobuf -L${LOCAL_LIB_PATH} favorite log log4cpp)
